From d30ea97464a6a178fa4dbfb39c25678ae11d4b02 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 2 Mar 2009 15:45:53 +0000 Subject: [PATCH] If additional areas got invalidated, don't try to add them to the paint * gtk/gtktextview.c (gtk_text_view_paint): If additional areas got invalidated, don't try to add them to the paint region: in an expose handler, we cannot paint outside the area that was passed in, since drawing will be clipped. So stealing the update region from the window causes lost draws. Patch by Owen Taylor svn path=/trunk/; revision=22442 --- ChangeLog | 11 +++++++++++ gtk/gtktextview.c | 14 -------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1287e765c7..5b35ed42ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2009-03-02 Matthias Clasen + + Bug 573688 – Don't steal update region in gtk_text_view_paint() + + * gtk/gtktextview.c (gtk_text_view_paint): If additional areas got + invalidated, don't try to add them to the paint region: in an expose + handler, we cannot paint outside the area that was passed in, since + drawing will be clipped. So stealing the update region from the + window causes lost draws. + Patch by Owen Taylor + 2009-03-02 Alexander Larsson Bug 573087 – gdkwindow.c: {x,y}_offset used uninitialized diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index da4f562730..97e1433098 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -4531,7 +4531,6 @@ gtk_text_view_paint (GtkWidget *widget, GtkTextView *text_view; GList *child_exposes; GList *tmp_list; - GdkRegion *updates; text_view = GTK_TEXT_VIEW (widget); @@ -4546,19 +4545,6 @@ gtk_text_view_paint (GtkWidget *widget, gtk_text_view_flush_first_validate (text_view); } - /* More regions could have become invalid in the above loop */ - updates = gdk_window_get_update_area (text_view->text_window->bin_window); - if (updates) - { - GdkRectangle rect; - - gdk_region_get_clipbox (updates, &rect); - - gdk_rectangle_union (area, &rect, area); - - gdk_region_destroy (updates); - } - if (!text_view->onscreen_validated) { g_warning (G_STRLOC ": somehow some text lines were modified or scrolling occurred since the last validation of lines on the screen - may be a text widget bug."); -- 2.30.2